#define Block_size 1024
#define no_of_maxFD 100
#define no_of_free_block 1000                             
/*	-- Total size
		Total size = Header size + total FileDescriptor size + Total Free LIst size + block size...
		size = -- + (noBlocks/5) + noBlocks
	total blocks = size/sizeof(block) 
	Number of file Descriptors: 1MB -> 100 (5Kb for a file)...
	min (10, Number of File Descriptors: (TotalBlockSize)/10kb; -> File Descriptors)
	Number of Blocks = (TotalSize-headersize)/(blocksize);

	1GB -> 200 File Descriptors	
*/

typedef struct file_descriptor
{
	char filename[100];//the file name 
	char path[150];//the location path size
	char filetype[10];
	int filesize;
	int blockno;
}fd;

typedef struct main_header
{
	char file_system_label[100];//file label
	long max_file_descriptor;//max number of file descriptors
	long used_file_descriptor;//number of used file descriptors
	//struct file_descriptor fd [no_of_maxFD];//Max number of file descriptors
	int used_blocks;
	int Total_Blocks;
}main_header;

fd *file_descriptors[no_of_maxFD];  //file descriptor array

int *freelist;  //freeblock/freelist array  NOTE: no_of_free_block is just an arbitrary number

typedef struct block
{
	char data[1024]; //char data;
	
}block;
//numofBlocks = ( size - sizeof(main_header) ) / ( sizeof(fd) + sizeof(int) + sizeof(block) );
int metaheader_startpoint;
int fd_startpoint;
int freelist_startpoint;
int block_startpoint;


